package com.wxm.eum;

/**
 * <p>
 *      通联PayType枚举
 * </p>
 *
 * @author: wxm
 * @Date: 2023/4/14
 */
public enum TlPayTypeEnum {
    WX_SCAN("W01","微信扫码支付"),
    WX_JS("W02","微信JS支付"),
    WX_APP("W06","微信小程序支付"),
    ZFB_SCAN("A01","支付宝扫码支付"),
    ZFB_JS("A02","支付宝JS支付"),
    ZFB_APP("A03","支付宝APP支付"),
    QQ_SCAN("Q01","手机QQ扫码支付"),
    QQ_JS("A02","手机QQ JS支付"),
    YL_SCAN("U01","银联扫码支付(CSB)"),
    YL_JS("U02","银联JS支付"),
    SZHB_H5("S03","数字货币H5"),
    ;
    private String code;
    private String msg;

    TlPayTypeEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public String getMsg() {
        return msg;
    }
    public String getCode() {
        return code;
    }
    public void setMsg(String msg) {
        this.msg = msg;
    }
    public void setCode(String code) {
        this.code = code;
    }

    public static TlPayTypeEnum getByCode(String code){
        TlPayTypeEnum[] enums = TlPayTypeEnum.class.getEnumConstants();
        for (TlPayTypeEnum anEnum : enums) {
            if (anEnum.code.equals(code)){
                return anEnum;
            }
        }
        return null;
    }
}
